const md5 = require('md5');

const sign = (obj) => {
    const keys = [];
    let res = '';
    for (const k in obj) {
        keys.push(k);
    }
    const c = keys.sort((a, b) => {
        return a.localeCompare(b);
    })
    for (let i = 0; i < c.length; i++) {
        res += obj[c[i]];
    }
    return md5(res + 'd393805c9fea36662befb6282aa7331c');
}

module.exports = {
    sign
}